/*
 * This file is part of Catfish.
 * Copyright (C) 2010 Namazu Studios LLC
 * 
 * Catfish is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of 
 * the License, or (at your option) any later version.
 * 
 * Catfish is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with Catfish.  If not, please visit:
 *  
 * http://www.gnu.org/licenses/
 *  
 */
package com.namazustudios.catfish.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Indicates that the object also annotated with @Entity should be cached in the
 * memcache. The Catfish service will automatically remove cached entities as
 * they are updated ensuring that the memcached objects are kept up to date in a
 * reasonable fashion.
 * 
 * It is important to note that no consistency guarantees can be made with
 * regards to bulk gets from the datastore. When fetching objects in bulk, it
 * attempts to fetch as many cached values as it can then proceeds to fetch from
 * the datastore. If your application relies on consistency with regards to bulk
 * fetches then it is best to not use this feature and figure out your own
 * caching stragety.
 * 
 * @author patricktwohig
 * 
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Cacheable {}
